module objects.abstractobject;

import material.material;
import objects.triangle;
import utils.vector2;
import utils.vector3;

class AbstractObject {
    //triangulate, precalculate and return raw triangles to render
    public abstract Triangle[] getTriangles();

    //return normals of a triangle, vertice-interpolated if specified
    public abstract TriangleNorms getTriNormals(int triIdx, bool interpolate);

    //get texture coordinates for the hit triangle
    public abstract Vector2f[] getTexCoords(int triIdx);

    //get material of intersected triangle
    public abstract Material getTriMaterial(int triIdx);

    //set material with index <idx> to <mat>
    public abstract void setMaterial(Material mat, int idx = 0);

    //get material <idx>
    public abstract Material getMaterial(int idx = 0);
}
